import 'package:json_annotation/json_annotation.dart';
import 'package:lazy_food/models/story_model.dart';

import 'recipe_model.dart';
part 'vip_model.g.dart';

@JsonSerializable()
class VipModel {
  String create_time;
  String release_time;
  String update_time;
  int id;
  int type;
  VipDataModel data;

  VipModel(this.create_time, this.release_time, this.update_time, this.id,
      this.type, this.data);

  factory VipModel.fromJson(Map<String, dynamic> json) =>
      _$VipModelFromJson(json);

  Map<String, dynamic> toJson() => _$VipModelToJson(this);
}

@JsonSerializable()
class VipDataModel {
  String title;
  List<RecipeModel>? recipes;
  List<StoryModel>? stories;

  VipDataModel(this.title, this.recipes, this.stories);

  factory VipDataModel.fromJson(Map<String, dynamic> json) =>
      _$VipDataModelFromJson(json);

  Map<String, dynamic> toJson() => _$VipDataModelToJson(this);
}
